package com.hy.video.monitor.annotation;

import com.hy.video.monitor.util.Constants;
import org.springframework.security.access.prepost.PreAuthorize;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

/**
 * 根据角色做校验
 */
@Retention(RetentionPolicy.RUNTIME)
@PreAuthorize("hasRole('" +
    Constants.AUTHORITY_ADMIN +
    "')")
public @interface RoleAdmin {
}
